import java.util.Scanner;


public class numTable {
	public static void main(String args[]){
		System.out.println("Enter Width");
		Scanner in= new Scanner(System.in);
		int width=in.nextInt();
		System.out.println("Enter length:");
		in= new Scanner(System.in);
		int length=in.nextInt();
		int [][] grid=new int [width][length];
		for (int counter=0; counter<length; counter++){
		}
		for (int counter=0; counter<width; counter++){
			for (int counter2=1; counter2<length;counter2++){
				grid [counter][counter2]= (counter+1)*(counter2+1);
			}
		}
		for (int counter=0; counter<width; counter++){
			for (int counter2=0; counter2<length; counter2++){
				if (counter2==length-1)
					System.out.println(grid [counter][counter2]);
				else
					System.out.print(grid [counter][counter2] + "\t");
			}
		}
	}
}
